<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>


<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>宁波分公司通讯录系统</title>


<!-- Bootstrap -->

<!-- <link href="resources/css/bootstrap.min.css" rel="stylesheet"
	media="screen"> -->
<!-- <link href="../../resources/css/style.css" rel="stylesheet" type="text/css"> -->
<style type="text/css">
.STYLE3 {
	font-size: 18px;
	color: #FFFFFF;
}
.STYLE4 {
	font-size: 12px;
	color: #999999;
}
.STYLE5 {
	font-size: 12px;
	font-weight: bold;
}
.STYLE6 {font-size: 14px}
</style>



</head>
<body onselectstart="return false" oncontextmenu="return false">
	
	
<br>


	

	<form method="post">
		<table WIDTH="74%" ALIGN=center BORDER=0 CELLSPACING=2 CELLPADDING=2>
			<tr>
				<td>部门选择：</td>
				<td><select id="bumen">
						<option value="" selected>请选择</option>
						<option value='总经理室'>总经理室</option>
						<option value='办公室'>办公室</option>
						<option value='人力资源部'>人力资源部</option>
						<option value='财务部'>财务部</option>
						<option value='企划部'>企划部</option>
						<option value='个人业务部'>个人业务部</option>
						<option value='银行保险业务发展部'>银行保险业务发展部</option>
						<option value='银行保险销售支援部'>银行保险销售支援部</option>
						<option value='教育培训部'>教育培训部</option>
						<option value='运营服务部'>运营服务部</option>
						<option value='保费部'>保费部</option>
						<option value='城区支公司'>城区支公司</option>
						<option value='象山营销服务部'>象山营销服务部</option>
						<option value='余姚营销服务部'>余姚营销服务部</option>
						<option value='北仑营销服务部'>北仑营销服务部</option>
						<option value='宁海支公司'>宁海支公司</option>
						<option value='长街营销服务部'>长街营销服务部</option>
						<option value='慈溪营销服务部'>慈溪营销服务部</option>
				</select></td>
				<td>姓名：</td>
				<td><input type="text" placeholder="Search"
					style="FONT-SIZE: 12px; WIDTH: 150px" maxlength=25 id="name" /></td>
				<td><input type="button" onClick="search();" value="查询" /></td>
			    <td><div align="right" class="STYLE5">
			      <div align="center"><a href="adress" class="STYLE6" >各营销服务部详细地址</a></div>
			    </div></td>
			</tr>
		</table>
	</form>





	<table width="75%" border="1" align="center" bordercolor="#ECE9D8">


		<tr>
			<td colspan="6" align="left" valign="middle" nowrap bgcolor="#507CD1"
				scope="row"><div align="center" class="STYLE19 STYLE3">按照条件筛选邮件发送地址</div></td>
		</tr>
		<tr>
			<td width="55" rowspan="2" align="left" valign="middle" nowrap
				bordercolor="#0066FF" scope="row">职务：</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="zhiwei" value="1"> 总经理室成员				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="zhiwei" value="2"> 分公司部门负责人				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="zhiwei" value="3"> 片区负责人				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="zhiwei" value="4">
					支公司、营销服务部负责人				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="zhiwei" value="5"> 组训				</div>			</td>
		</tr>
		<tr>
			<td height="28" align="left" valign="middle" nowrap
				bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="zhiwei" value="6">
					支公司、营销服务部综合内勤				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF"><div
					align="justify"></div></td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF"><div
					align="justify"></div></td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF"><div
					align="justify"></div></td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF"><div
					align="justify"></div></td>
		</tr>
		<tr>
			<td rowspan="2" align="left" valign="middle" nowrap
				bordercolor="#0066FF" scope="row">部门：</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="2"> 办公室				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="3"> 人力资源部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="4"> 财务部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="5"> 企划部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="8"> 个人业务部				</div>			</td>
		</tr>
		<tr>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="18"> 银行保险业务发展部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value=19> 银行保险销售支援部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="9"> 教育培训部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="6"> 运营服务部				</div>			</td>
			<td align="left" valign="middle" nowrap bordercolor="#0066FF">

				<div align="justify">
					<input type="checkbox" name="bumen" value="7"> 保费部				</div>			</td>
		</tr>


		<tr>
			<td align="left" valign="middle" nowrap scope="row">&nbsp;</td>
			<td align="left" valign="middle" nowrap>

			  <div align="justify">
					<input type="button" value="提交" onClick="showemail();">
				</div>			</td>
			<td colspan="3" align="left" valign="middle" nowrap><div align="justify" class="STYLE4">注：请使用IE浏览器提交并发送邮件，否则可能出现中文乱码现象!</div>			  <div align="justify"></div>			  <div align="justify"></div></td>
			<td align="left" valign="middle" nowrap><div align="justify"></div></td>
		</tr>
	</table>
	<!-- <p>&nbsp;</p>
	<p>
	<table width="91%" border="1" align="center" cellpadding="0"
		cellspacing="0" bordercolor="#FFFFFF" bordercolorlight="#FFFFFF"
		bordercolordark="#F6B83B">
		<tr align="center" bgcolor="#e3F4F7">
			<td width="26%" bgcolor="#F9D16B">管理员名称</td>
			<td width="12%" bgcolor="#F9D16B"><input type="checkbox"
				name="zhiwei2" value="1"> 总经理室成员</td>
			<td width="12%" bgcolor="#F9D16B"><input type="checkbox"
				name="zhiwei3" value="2"> 分公司部门负责人</td>
			<td width="12%" bgcolor="#F9D16B">图书管理</td>
			<td width="11%" bgcolor="#F9D16B">图书借还</td>
			<td width="10%" bgcolor="#F9D16B">系统查询</td>
			<td width="9%" bgcolor="#F9D16B">权限设置</td>
			<td width="8%" bgcolor="#F9D16B">删除</td>
		</tr>
		<tr align="center" bgcolor="#e3F4F7">
			<td width="26%" bgcolor="#F9D16B">管理员名称</td>
			<td width="12%" bgcolor="#F9D16B">系统设置</td>
			<td width="12%" bgcolor="#F9D16B">读者管理</td>
			<td width="12%" bgcolor="#F9D16B">图书管理</td>
			<td width="11%" bgcolor="#F9D16B">图书借还</td>
			<td width="10%" bgcolor="#F9D16B">系统查询</td>
			<td width="9%" bgcolor="#F9D16B">权限设置</td>
			<td width="8%" bgcolor="#F9D16B">删除</td>
		</tr>
	</table>
	<p>&nbsp;</p>
	<p> -->
	<br>






	<div class="container" align="center" id="txl_grid"></div>
	
	<!-- jQuery 1.7.2 or higher -->


	<script src="resources/js/jquery-1.9.0.min.js"></script>
	<script src="resources/js/bootstrap.min.js"></script>
	<script type="text/javascript">
	$(function(){	
		search();
	});
	function search(){
		var bumen=$("#bumen").val();
		var name=$("#name").val();
		$("#txl_grid").load("txlgrid",{"bumen":bumen,"name":name});
	}
	
	function showemail(){

		var zhiwei=getZhiwei();
		var bumen=getBumen();
		window.location.href="showgrid?zhiwei="+zhiwei+"&bumen="+bumen;
		//$("#showgrid").load("showgrid",{"zjl":zjl,"bm":bm,"pq":pq,"fzr":fzr,"zx":zx,"zhnq":zhnq,"bumen":bumen});
	} 
	
/* 	function showemail(){

		var zjl=$("#zjl").filter(":checked").length;
		var bm=$("#bm").filter(":checked").length;
		var pq=$("#pq").filter(":checked").length;
		var fzr=$("#fzr").filter(":checked").length;
		var zx=$("#zx").filter(":checked").length;
		var zhnq=$("#zhnq").filter(":checked").length;
		var bumen=getBumen();
		console.log($("#zjl").filter(":checked").length);
		window.location.href="showgrid?zjl="+zjl+"&bm="+bm+"&pq="+pq+"&fzr="+fzr+"&zx="+zx+"&zhnq="+zhnq+"&bumen="+bumen;
		//$("#showgrid").load("showgrid",{"zjl":zjl,"bm":bm,"pq":pq,"fzr":fzr,"zx":zx,"zhnq":zhnq,"bumen":bumen});
	} */
	function getZhiwei(){
		var zhiwei="";
		var $cks=$("input[type='checkbox'][name='zhiwei']:checked");
		var len = $cks.length;
		if(len==0){
			return null;
		}else{
			$cks.each(function(index){
	   			if(index==len-1){
	   				zhiwei+=$(this).val();
	   			}else{
	   				zhiwei+=$(this).val()+",";
	   			} 
			});
		}
		return zhiwei;
}

	function getBumen(){
			var bumen="";
			var $cks=$("input[type='checkbox'][name='bumen']:checked");
			var len = $cks.length;
			if(len==0){
				return null;
			}else{
				$cks.each(function(index){
		   			if(index==len-1){
		   				bumen+=$(this).val();
		   			}else{
		   				bumen+=$(this).val()+",";
		   			} 
				});
			}
			return bumen;
	}
	</script>
	



</body>

</html>
